gnome-shell-extension-prefs uses format(), but can't pull in Shell
(which is a dependency for the module), since that in turn would pull in
Meta. Fix this by moving the introspected int format function to ShellJS
instead.
https://bugzilla.gnome.org/show_bug.cgi?id=673106
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
-const Shell = imports.gi.Shell;
+const ShellJS = imports.gi.ShellJS;
/*
* This function is intended to extend the String object and provide
case 'd':
let intV = parseInt(args[i++]);
if (hasAlternativeIntFlag)
- s = Shell.format_int_alternative_output(intV);
+ s = ShellJS.format_int_alternative_output(intV);
else
s = intV.toString();
break;
JS_EndRequest (context);
return ret;
}
+
+/**
+ * shell_js_format_int_alternative_output:
+ * @intval:
+ *
+ * Returns: (transfer full):
+ */
+gchar *
+shell_js_format_int_alternative_output (gint intval)
+{
+ return g_strdup_printf ("%Id", intval);
+}
const char *directory,
GError **error);
+gchar *shell_js_format_int_alternative_output (gint intval);
+
G_BEGIN_DECLS
#endif /* __SHELL_JS_H__ */
return ret;
}
-
-/**
- * shell_format_int_alternative_output:
- * @intval:
- *
- * Returns: (transfer full):
- */
-gchar *
-shell_format_int_alternative_output (gint intval)
-{
- return g_strdup_printf ("%Id", intval);
-}
gboolean shell_util_wifexited (int status,
int *exit);
-gchar *shell_format_int_alternative_output (gint intval);
-
G_END_DECLS